import { ElMessage } from "element-plus";

// 普通消息
const Message = (message:string):any => {
        return ElMessage({
            showClose:true,//是否显示关闭按钮，
            message,
            center:true,
            duration:1500
        })
}

// 成功的信息
const successMessage = (message:string):any => {
    return ElMessage({
        showClose:true,//是否显示关闭按钮，
        type:"success",
        message,
        center:true,
        duration:1500
    })
}

// 失败的信息
const errorMessage = (message:string):any => {
    return ElMessage({
        showClose:true,//是否显示关闭按钮，
        message,
        center:true,
        duration:1500,
        type:"error"
    })
}
// 警告的信息

const warnMessage = (message:string):any => {
    return ElMessage({
        showClose:true,//是否显示关闭按钮，
        message,
        center:true,
        duration:1500,
        type:"warning"
    })
}

// 取消的消息

const infoMessage = (message:string):any=>{
    return ElMessage({
        showClose:true,
        message,
        duration:1500,
        type:'info'
    })
}
export {
    warnMessage,
    errorMessage,
    successMessage,
    Message,
    infoMessage


}